package com.example.pkmedical.Fragments;

import android.content.Intent;
import android.os.Handler;
import android.os.SystemClock;
import android.view.View;
import android.widget.Button;

import com.example.pkmedical.APP.MyApp;
import com.example.pkmedical.Activity.warning.LeaveBedActivity;
import com.example.pkmedical.Activity.warning.HeadWarningActivity;
import com.example.pkmedical.Base.BaseFragment;
import com.example.pkmedical.Event.MessageWrap;
import com.example.pkmedical.R;
import com.example.pkmedical.Utils.CommandUtil;
import com.example.pkmedical.Utils.SerialProtUtil;
import com.example.pkmedical.Utils.TestTime;

import java.util.concurrent.TimeUnit;

import butterknife.BindView;
import butterknife.OnClick;
import io.reactivex.Flowable;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable;

public class WarningFragment extends BaseFragment {
    @BindView(R.id.warning_lichuang_button)
    Button warningLichuangButton;
    @BindView(R.id.warning_head_button)
    Button warningHeadButton;

    @Override
    public int setLayoutId() {
        return R.layout.fragment_warning;
    }

    @Override
    public void findViewById(View view) {

    }

    @Override
    public void setViewData(View view) {

    }

    @Override
    public void setClickEvent(View view) {

    }

    @Override
    protected boolean isRegisteredEventBus() {
        return true;
    }

    @Override
    public void onReceiveEvent(MessageWrap event) {
        super.onReceiveEvent(event);
    }

    @OnClick({R.id.warning_lichuang_button, R.id.warning_head_button})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.warning_lichuang_button:
//                Intent intent = new Intent();
//                intent.putExtra("colorType", 0);
//                intent.setClass(MyApp.getAppContext(),WarningLeftTopActivity.class);
//                startActivity(intent);
//                getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                startActivity(new Intent(MyApp.getAppContext(), LeaveBedActivity.class));
//                getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
            case R.id.warning_head_button:
                startActivity(new Intent(MyApp.getAppContext(), HeadWarningActivity.class));
//                getActivity().overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
                break;
        }
    }

}
